package Demo5;

public class Demo5 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(() -> {
//            while(true) {
//
//            }
        });

        System.out.println(t.getState() + " isalive: " + t.isAlive());
        t.start();
        //System.out.println(t.getState() + " isalive: " + t.isAlive());
        t.join();
        System.out.println(t.getState() + " isalive: " + t.isAlive());

    }
}
